﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure.Interception;
using System.Linq;
using System.Web;

namespace MVCEF.DBContext
{
    public class CustomDbConfiguration : DbConfiguration
    {
        public CustomDbConfiguration() : base()
        {
            //SetDatabaseLogFormatter((context, writeAction) => new CustomDatabaseLogFormatter(context, writeAction));
            //this.AddInterceptor(new CommandInterceptor(new Logger()));
            this.AddInterceptor(new SQLProfiler(@"D:\log.txt", 1));
        }
    }
}